home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 1
/
Cream of the Crop 1.iso
/
UTILITY
/
TASEXAM6.ARJ
/
MACD_BUY.TAS
< prev
next >
Wrap
Text File
|
1992-02-12
|
2KB
|
66 lines
{ MACD_BUY.TAS, by Werner Pelz
Here is the BOTTOM-version, which picks MACD-signals after a substantial
decline in the underlying stocks. Try this one on JAPAN !!! It is basically
the same script. Only the direction is different. I find it more useful to
filter with 2 different scripts, because it's less confusing. So when your
guts tell you a market may be overdone on the upside, use the TOP-version.
And vice versa for the downside. In either case, watch for the 3 moving
averages. They represent the TRIPLE-MOVING-AVERAGE-COMPARISON-MODEL.
SHORT-TERM-MA > MEDIUM-TERM-MA > LONG-TERM-MA = UPTREND
LT-MA > MT-MA > ST-MA = DOWNTREND
MT-MA > ST-MA > LT-MA = TURNING DOWN
LT-MA > ST-MA > MT-MA = TURNING UP
Priority should be given to the trend. The sell signals you got should
shake hands with TURNING DOWN situations, i.e. the ST-MA crosses the MT-MA
from top to down. I use 10-, 20- and 40-days-periods. Works smoothely.
}
#max_quotes 100
#output_file 'macd_buy.lst'
graph_switch = 1;
if first_ticker then
begin
writeln('TICKER SHORT MA LONG MA MACD_$ MACD_% TRIGGER');
end;
short_ma : array;
short_ma = mov(c,12,'e');
long_ma : array;
long_ma = mov(c,25,'e');
macd_abs : array;
macd_abs = macd();
macd_pct : array;
macd_pct = DIV(macd(),short_ma)* 100;
trigger : array;
trigger = MACDTRI();
if macd_pct < -2.0 and macd_pct > - 3.0 and trigger < macd_abs then
BEGIN
gosub dograph;
writeln(ticker,short_ma,' ',long_ma,' ',macd_abs,'',macd_pct,
' ',trigger,' ',' ***BUY***');
if macd_pct < -3.0 and trigger < macd_abs then
BEGIN
gosub dograph;
writeln(ticker,short_ma,' ',long_ma,' ',macd_abs,'',macd_pct,
' ',trigger,' ',' ***STRONG BUY***');
END;
return;
:dograph
if graph_switch = 0 then return;
opengraph(2,-100,0);
sizegraph(1,1);
graph(1,mov(c,10,'s'),'10-days-SMA',mov(c,20,'s'),'20-days-SMA',
mov(c,40,'s'),'40-days-SMA')
graph(macd(),'MACD-$',trigger,'TRIGGER')
{drawline(11,0,2.0,0,2.0);}
{drawline(13,0,3.0,0,3.0);}
closegraph();
return;